// eslint-disable-next-line
import { UserLayout, BasicLayout, RouteView, BlankLayout, PageView } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'

export const asyncRouterMap = [

  {
    path: '/',
    name: 'dashboard',
    component: BasicLayout,
    meta: { title: '医院信息汇总' },
    redirect: '/dashboard',
    children: [
      // Dashboard
      {
        path: '/dashboard',
        name: 'dashboard',
        component: () => import('@/views/dashboard/Dashboard'),
        meta: { title: '医院信息汇总', keepAlive: false, icon: 'heart' }
      },
      {
        path: '/hospital-information',
        name: 'hospital-information',
        component: () => import('@/views/hospital-information/HospitalList'),
        meta: { title: '医院信息', keepAlive: false, icon: 'file-done' }
      },
      // Volunteer approval
      {
        path: '/volunteer-approval',
        name: 'volunteer-approval',
        meta: { title: '医院信息审批', keepAlive: true, icon: bxAnaalyse },
        redirect: '/volunteer-approval/list',
        component: PageView,
        children: [
          {
            path: '/volunteer-approval/list',
            name: 'volunteer-approval-list',
            component: () => import('@/views/volunteer-approval/ApprovalList'),
            meta: { title: '医院需求审批', keepAlive: false, icon: 'tag' }
          },
          {
            path: '/modify-requests/ModifyRequestList',
            name: 'modify-requests-list',
            component: () => import('@/views/modify-requests/ModifyRequestList'),
            meta: { title: '信息变更申请', keepAlive: false, icon: 'tag' }
          },
          {
            path: '/import/import',
            name: 'import-importdata',
            component: () => import('@/views/import/ImportData'),
            meta: { title: '数据上传', keepAlive: false, icon: 'profile' }
          }
        ]
      }
    ]
  },
  {
    path: '*', redirect: '/404', hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
      },
      {
        path: 'recover',
        name: 'recover',
        component: undefined
      }
    ]
  },

  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  }

]
